package com.itheima.controller;

import com.alibaba.dubbo.config.annotation.Reference;
import com.itheima.entity.Result;
import com.itheima.service.SetMealService;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

@RestController
@RequestMapping("/setMeal")
public class SetMealController {
    @Reference(version = "1.0.0")
    private SetMealService setMealService;

    @PostMapping("/getSetmeal")
    public Result getSetmeal(){
        return setMealService.mobileFindAll();
    }

    @PostMapping("/findById")
    public Result findById(Integer id){
        return setMealService.mobileFindByID(id);
    }

}
